package com.tjetc.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serial;
import java.io.Serializable;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "weibo")
public class BClassify implements Serializable {
    @Serial
    private static final long serialVersionUID = -5410985191404405196L;
    /**
    * 博客类型
    */
    @Id
    @Field(type = FieldType.Integer,store = true,index = false)
    private Integer id;

    /**
    * 名称
    */
    @Field(type = FieldType.Text,store = true,index = true,analyzer = "ik_max_word")
    private String name;
}